// api/patient.ts
import request from "../request";

export interface PatientCard {
  patientId: string;
  patientName: string;
  patientGender: number;
  patientBirth: string;
}

export interface GetPatientByUserIdResponse {
  code: number;
  msg?: string;
  data: PatientCard[];
}

export const getPatientByUserId = async (
  userId: string
): Promise<GetPatientByUserIdResponse> => {
  const data = await request({
    url: `/system/patient/getPatientByUserId/${userId}`,
    method: "GET",
  });
  return data;
};
